package com.lengxf.design;

/**
 * 非中介符表达式角色
 * By Lengxf
 */
public class SentenceNode extends AbstractNode {
    private final AbstractNode direction;

    private final AbstractNode action;

    private final AbstractNode distance;

    public SentenceNode(AbstractNode direction, AbstractNode action, AbstractNode distance) {
        this.direction = direction;
        this.action = action;
        this.distance = distance;
    }

    @Override
    public String interpret() {
        return direction.interpret() + action.interpret() + distance.interpret();
    }

}
